<div class="modal-header">
    {{ detailInfo.title }}
    <i class="yb-icon ico-close" title="关闭" ng-click="cancel()"></i>
</div>
<div class="modal-body">
    <div class="row">
        <form name="form" class="form-horizontal clearfix" novalidate>
            <div class="form-group">
                <label class="col-xs-2 control-label">单号：</label>
                <label class="col-xs-9 control-label p-l-n text-left spill-dots">
                    {{ detailInfo.code || '-' }}
                </label>
            </div>
            <div class="form-group">
                <label class="col-xs-2 control-label">车辆位置：</label>
                <label class="col-xs-9 control-label p-l-n text-left spill-dots">
                    {{ detailInfo.address || '-' }}
                </label>
            </div>

            <!-- 转移营销部--特机登录 -->
            <div ng-if="detailInfo.type==1">
                <div class="form-group">
                    <label class="col-xs-2 control-label">营销部：</label>
                    <label class="col-xs-9 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.marketingCenterName || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i>营销部：</label>
                    <div class="col-xs-5 wrapper-none">
                        <div bj-select name="newMarketingCenterName" required source="marketingCenters" ng-model="dataInfo.newMC" bind-key="dm"></div>
                    </div>
                    <div class="col-xs-4 msg-block" ng-show="form.newMarketingCenterName.$dirty || (form.newMarketingCenterName.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.newMarketingCenterName.$error.required">
                            <i class="yb-icon ico-times-circular"></i><span>必填项，请填写</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 分单--特机登录 -->
            <div ng-if="detailInfo.type==2">
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i>一级服务站：</label>
                    <div class="col-xs-5 wrapper-none">
                        <div bj-select name="level1ServiceStationId" required source="companyFWZ1Dealers" source-label-key="companyName"
                            ng-model="dataInfo.newFWZ1" on-option-changed="handleFWZ1Change()"></div>
                    </div>
                    <div class="col-xs-4 msg-block" ng-show="form.level1ServiceStationId.$dirty || (form.level1ServiceStationId.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.level1ServiceStationId.$error.required">
                            <i class="yb-icon ico-times-circular"></i><span>必填项，请填写</span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">二级级服务站：</label>
                    <div class="col-xs-5 wrapper-none">
                        <div bj-select source="companyFWZ2Dealers" source-label-key="companyName" ng-model="dataInfo.newFWZ2"></div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">分单备注：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" class="form-control" ng-model="dataInfo.remark" maxlength="36">
                    </div>
                </div>
            </div>

            <!-- 分单--一级服务站登录 -->
            <div ng-if="detailInfo.type==3">
                <div class="form-group">
                    <label class="col-xs-2 control-label">一级服务站：</label>
                    <label class="col-xs-9 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.level1ServiceStation || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i>二级服务站：</label>
                    <div class="col-xs-5 wrapper-none">
                        <div bj-select name="level2ServiceStationId" required source="companyFWZ2Dealers" source-label-key="companyName" ng-model="dataInfo.newFWZ2"></div>
                    </div>
                    <div class="col-xs-4 msg-block" ng-show="form.level2ServiceStationId.$dirty || (form.level2ServiceStationId.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.level2ServiceStationId.$error.required">
                            <i class="yb-icon ico-times-circular"></i><span>必填项，请填写</span>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">分单备注：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" class="form-control" ng-model="dataInfo.remark" maxlength="36">
                    </div>
                </div>
            </div>

            <!-- 派工--一级服务站登录 -->
            <div ng-if="detailInfo.type==4">
                <div class="form-group">
                    <label class="col-xs-2 control-label">一级服务站：</label>
                    <label class="col-xs-9 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.level1ServiceStation || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i>维修技师：</label>
                    <div class="col-xs-5 wrapper-none">
                        <div bj-select name="technicianName" required source="technicians" source-label-key="cnameTel" ng-model="dataInfo.tech"></div>
                    </div>
                    <div class="col-xs-4 msg-block" ng-show="form.technicianName.$dirty || (form.technicianName.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.technicianName.$error.required">
                            <i class="yb-icon ico-times-circular"></i><span>必填项，请填写</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 派工--二级服务站登录 -->
            <div ng-if="detailInfo.type==5">
                <div class="form-group">
                    <label class="col-xs-2 control-label">一级服务站：</label>
                    <label class="col-xs-9 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.level1ServiceStation || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">二级服务站：</label>
                    <label class="col-xs-9 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.level2ServiceStation || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i>维修技师：</label>
                    <div class="col-xs-5 wrapper-none">
                        <div bj-select name="technicianName" required source="technicians" source-label-key="cnameTel" ng-model="dataInfo.tech"></div>
                    </div>
                    <div class="col-xs-4 msg-block" ng-show="form.technicianName.$dirty || (form.technicianName.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.technicianName.$error.required">
                            <i class="yb-icon ico-times-circular"></i><span>必填项，请填写</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 修改整车编码 -->
            <div ng-if="detailInfo.type==6">
                <div class="form-group">
                    <label class="col-xs-2 control-label"><i>*</i>整车编码：</label>
                    <div class="col-xs-4 wrapper-none">
                        <input type="text" name="engineNo" class="form-control" ng-model="dataInfo.engineNo" required maxlength="17">
                    </div>
                    <div class="col-xs-5 msg-block" ng-show="form.engineNo.$dirty || (form.engineNo.$invalid && submitted)">
                        <div class="error-msg" ng-if="form.engineNo.$error.required">
                            <i class="yb-icon ico-times-circular"></i><span>必填项，请填写</span>
                        </div>
                    </div>
                </div>
                <div class="form-group" ng-if="!!dataInfo.lifetimeWarranty" style="display: flex;align-items: center;">
                    <label class="col-xs-2 control-label">是否终身质保：</label>
                    <span>是</span>
                </div>
            </div>
        </form>
    </div>
    <div class="row m-t-md">
        <div class="text-center">
            <button class="btn btn-primary m-r-md" ng-click="ok(form.$valid)">确定</button>
            <button class="btn btn-default" ng-click="cancel()">取消</button>
        </div>
    </div>
</div>
